home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr11
/
ad_rrun.zip
/
AD_RRUN.TXT
Wrap
Text File
|
1993-06-11
|
3KB
|
74 lines
*!*****************************************************************************
*!
*! Function: AD_OVL()
*!
*!*****************************************************************************
FUNCTION ad_ovl(cDosCall,bResetCode,lKeepScr,cMessage)
// bResetCode is ignored in this version
//
// The R&R Report Writer Interface system requires the use of AD_OVL(),
// which is an AD function with three incarnations, one for each of the three
// major swapper utilities, Overlay() Library, Blinker 2.01, and Dr. Switch
// ASE. A number of AD users have asked how to use the RRUNTIME system
// supplied with R&R so the code provided here allows you to recreate the
// AD_OVL() function but solely for use in calling R&R RRUNTIME!
//
// Note that using RRUNTIME may be less than satisfactory since a number of
// users have reported over the years that they still have memory problems
// when using it. The three utiulities named above may be preferable. But,
// for what it's worth, here is a way to change AD_OVL() to call RRUNTIME
// using Clipper's RUN command:
//
//
// Instructions to install in your system, using AD and Zach1:
// 1. Export AD_F010 to a personal subdirectory, like \ad\adlib\mystuff
// 2. Change to that subdirectory.
// 3. Run Zach1. Go to the U-field that has the AD_OVL() code.
// 4. Go to the user code itself. Using Ctrl-Y, delete all lines down
// to the line that reads:
// FUNCTION AD_GetFiles()
// (You want to retain the AD_GetFiles() and AD_RestFiles() code
// in this user field.)
// 5. Press [Insert] to be sure you are in insert mode.
// 6. Press Ctrl-K and select "Read a file"
// 7. Type in the name of this file. It should be inserted above the
// line: FUNCTION AD_GetFiles()
// 8. Now you can Escape and Accept these changes. The routine is ready
// to be exported into your system to call R&R Runtime.
LOCAL aFiles,oldcursor,oldpath,oldarea,nRow:=ROW(),nCol:=COL(),cScreen
LOCAL cOldColor:=SETCOLOR(),retval,ocolors
oldcursor:=SETCURSOR(1) // Set cursor on
oldarea:=ALIAS() // Save current workarea
aFiles:=AD_GetFiles() // Save & close all files
cScreen:=SaveScreen(0,0,24,79) // Save screen
COMMIT // Flush everything out to disk
ocolors:=ZCOLORS(ZPOPCOLORS())
cMessage:=ALLTRIM(cMessage)
DISPBOX(10,40-(LEN(cMessage)/2)-2,14,40+(LEN(cMessage)/2)+2,1)
SCROLL(11,40-(LEN(cMessage)/2)-1,13,40+(LEN(cMessage)/2)+1)
@ 12, 40-(LEN(cMessage)/2) SAY cMessage
ZCOLORS(ocolors)
SETCOLOR("N/N")
SETCURSOR(0)
SETPOS(ZMSGLINE(),0)
IF VALTYPE(cDosCall)="C" .AND. UPPER(cDosCall)="RRUN "
cDosCall:="RRUNTIME "+SUBSTR(cDosCall,6)
RUN (cDosCall)
retval:=.t.
else
ZDIALOGBOX("AD_OVL() Intended here only for AD R&R Interface")
retval:=.f.
ENDIF
AD_RestFiles(aFiles) // Reopen files
IF LEN(oldarea)>0 // Reselect the workarea
SELECT (oldarea)
ENDIF
DEVOUT(nRow,nCol) // Reset Cursor Position
SETCOLOR(cOldColor)
SETCURSOR(oldcursor) // Reset cursor
RestScreen(0,0,24,79,cScreen) // Restore Screen
RETURN retval